import 'dart:math';

import 'package:p_location/net/dio_http_client.dart';

class ObjMapPath {
  static String pathUrl = "";

  static getInitUrl(bool hide) {
    //http://172.16.10.63:8888/map/index3.html?buildId=$buildId&pointList=&mapConfig={%22markWay%22:%22addPoint%22}&mapType=3D&mapServer=http://172.16.10.63:8888/&time=${Random().nextInt(10000)}
    String webPageName = "jpgmap/index.html";
    String buildId = "jpg";
    String mapServer = ObjMapPath.pathUrl;
    int time = Random().nextInt(10000);
    String fullUrl;
    if (hide) {
      fullUrl =
          '${DioHttpClient.baseUrl}$webPageName?hideFloorControl=true&time=$time&buildId=$buildId&mapServer=$mapServer/';
    } else {
      fullUrl =
          '${DioHttpClient.baseUrl}$webPageName?time=$time&buildId=$buildId&mapServer=$mapServer/';
    }
//    print('fullUrl$fullUrl');
//    buildId = "900115";
//
//    fullUrl = "http://172.16.10.63:8888/jpgmap/index31.html?buildId=$buildId&mapServer=http://172.16.10.63:8888/&time=${Random().nextInt(10000)}";
//
//    print('fullUrl$fullUrl');
    return fullUrl;
  }
}
